﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xc.DataAccess.Core;
using Xc.DataAccess.DataBase.DeviceInfos.Models;

namespace Xc.DataAccess.DataBase.DeviceInfos
{
    public interface ITableInfoService<TInfo, TInfoHistory>
    {
        ResultData<TInfo[]> Gets(string deviceid);
        Task<TInfoHistory[]> Gets(string deviceId, DateTime? dateTimeStart, DateTime? dateTimeEnd);
        Task<DataTableInfo> GetTable(string deviceId, bool autoAppendLastState, DateTime? dateTimeStart, DateTime? dateTimeEnd);
        Task<Result> Remove(string deviceId, string name);
        Task<Result> Set(Dictionary<string, UnitString> valuePairs, string deviceId);
        Task<Result> Set(string key, UnitString value, string deviceId);
    }
}